// -----------------------------
// Author: 		Dhaenens Gert 
// Creation: 	10/9/2014 11:54:10 AM				
// -----------------------------

#ifndef _Common_h
#define _Common_h

/* Defines */
#include "Defines.h"

/* STD Defines */
#include "StdDef.h"

/* Ref Ptr */
#include "RefPtr.h"

/* Math */
#include "CMath.h"
#include "Quaternion.h"
#include "Color.h"
#include "Matrix.h"
#include "Vector2.h"
#include "Vector3.h"
#include "Vector4.h"

/* Log */
#include "Log.h"

/* CRT Debug */
#ifdef _DEBUG
#	include <crtdbg.h>
#	define _CRTENABLE			_CrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF | _CRTDBG_ALLOC_MEM_DF)
#	define _CRTBREAKALLOC(x)	_CrtSetBreakAlloc(x)
#else
#	define _CRTENABLE
#	define _CRTBREAKALLOC(x)
#endif

/* SSE Intrinsics */
#ifndef _NO_INTRINSICS
#include <mmintrin.h>
#endif

/* Win32 Headers */
#define NOMINMAX
#define WIN32_LEAN_AND_MEAN
#define _WIN32_WINNT		0x0601
#define NTDDI_VERSION		0x06010000
#include <Windows.h>
#include <tchar.h>

/* STD Libs */
#include <vector>
#include <map>
#include <algorithm>
using namespace std;

/* DxLib */
#include "..\\Libs\\DxLib\\incl\\DxLib.h"
using namespace DxLib;
#ifdef WIN64
#ifdef _DEBUG
#pragma comment(lib, "..\\Libs\\DxLib\\lib\\x64\\DxLib_d.lib")
#else
#pragma comment(lib, "..\\Libs\\DxLib\\lib\\x64\\DxLib.lib")
#endif
#else
#ifdef _DEBUG
#pragma comment(lib, "..\\Libs\\DxLib\\lib\\x86\\DxLib_d.lib")
#else
#pragma comment(lib, "..\\Libs\\DxLib\\lib\\x86\\DxLib.lib")
#endif
#endif

/* FMOD */
#include "..\\Libs\FMOD\inc\fmod.hpp"
#ifdef WIN64
#ifdef _DEBUG
#pragma comment(lib, "..\\Libs\\FMOD\\lib\\fmodexL64_vc.lib")
#else
#pragma comment(lib, "..\\Libs\\FMOD\\lib\\fmodex64_vc.lib")
#endif
#else
#ifdef _DEBUG
#pragma comment(lib, "..\\Libs\\FMOD\\lib\\fmodexL_vc.lib")
#else
#pragma comment(lib, "..\\Libs\\FMOD\\lib\\fmodex_vc.lib")
#endif
#endif

/* Game Config */
struct GameConfig
{
	TString	Caption;
	UInt32	Width;
	UInt32	Height;
	Bool	Fullscreen;
	Bool	VSync;
};

/* Vertex */
struct Vertex
{
	Vector4	P;
	Vector3	N;
	Vector2	T;
};

/* Index */
typedef UInt32 Index;

/* Sound Sample Type */
enum class SoundWaveType
{
	Unknown,
	Sine,
	Square,
	Triangle,
	Sawtooth,
	Combined,
};

#endif